
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Example macro implementations &#8212; PSA Crypto API 1.0.0 documentation</title>
    <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.0.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Changes to the API" href="history.html" />
    <link rel="prev" title="Example header file" href="example_header.html" />
   
  <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head>
  <body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="example-macro-implementations">
<span id="appendix-specdef-values"></span><h1>Example macro implementations</h1>
<p>This appendix provides example implementations of the function-like macros that have specification-defined values.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In a future version of this specification, these example implementations will be replaced with a pseudo-code representation of the macro’s computation in the macro description.</p>
</div>
<p>The examples here provide correct results for the valid inputs defined by each API, for an implementation that supports all of the defined algorithms and key types. An implementation can provide alternative definitions of these macros:</p>
<ul class="simple">
<li>If the implementation does not support all of the algorithms or key types, it can provide a simpler definition of applicable macros.</li>
<li>If the implementation provides vendor-specific algorithms or key types, it needs to extend the definitions of applicable macros.</li>
</ul>
<div class="section" id="algorithm-macros">
<h2>Algorithm macros</h2>
<dl class="docutils">
<dt><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG" title="PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG"><code class="docutils literal"><span class="pre">PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">aead_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((((</span></code><code class="docutils literal"><span class="pre">aead_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x003f0000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x05400100</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">?</span> </code><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_CCM" title="PSA_ALG_CCM"><code class="docutils literal"><span class="pre">PSA_ALG_CCM</span></code></a><code class="docutils literal"> <span class="pre">:</span> <span class="pre">(((</span></code><code class="docutils literal"><span class="pre">aead_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x003f0000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x05400200</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">?</span> </code><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_GCM" title="PSA_ALG_GCM"><code class="docutils literal"><span class="pre">PSA_ALG_GCM</span></code></a><code class="docutils literal"> <span class="pre">:</span> <span class="pre">(((</span></code><code class="docutils literal"><span class="pre">aead_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x003f0000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x05000500</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">?</span> </code><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_CHACHA20_POLY1305" title="PSA_ALG_CHACHA20_POLY1305"><code class="docutils literal"><span class="pre">PSA_ALG_CHACHA20_POLY1305</span></code></a><code class="docutils literal"> <span class="pre">:</span> </code><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_NONE" title="PSA_ALG_NONE"><code class="docutils literal"><span class="pre">PSA_ALG_NONE</span></code></a><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_AEAD_WITH_SHORTENED_TAG" title="PSA_ALG_AEAD_WITH_SHORTENED_TAG"><code class="docutils literal"><span class="pre">PSA_ALG_AEAD_WITH_SHORTENED_TAG</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">aead_alg</span></code><code class="docutils literal"><span class="pre">,</span> </code><code class="docutils literal"><span class="pre">tag_length</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(((</span></code><code class="docutils literal"><span class="pre">aead_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x003f0000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">|</span> <span class="pre">(((</span></code><code class="docutils literal"><span class="pre">tag_length</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x3f</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&lt;&lt;</span> <span class="pre">16)))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_DETERMINISTIC_ECDSA" title="PSA_ALG_DETERMINISTIC_ECDSA"><code class="docutils literal"><span class="pre">PSA_ALG_DETERMINISTIC_ECDSA</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x06000700</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_ECDSA" title="PSA_ALG_ECDSA"><code class="docutils literal"><span class="pre">PSA_ALG_ECDSA</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x06000600</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_FULL_LENGTH_MAC" title="PSA_ALG_FULL_LENGTH_MAC"><code class="docutils literal"><span class="pre">PSA_ALG_FULL_LENGTH_MAC</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">mac_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">mac_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x003f0000</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_GET_HASH" title="PSA_ALG_GET_HASH"><code class="docutils literal"><span class="pre">PSA_ALG_GET_HASH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span> <span class="pre">?</span> </code><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_NONE" title="PSA_ALG_NONE"><code class="docutils literal"><span class="pre">PSA_ALG_NONE</span></code></a><code class="docutils literal"> <span class="pre">:</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x02000000</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_HKDF" title="PSA_ALG_HKDF"><code class="docutils literal"><span class="pre">PSA_ALG_HKDF</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x08000100</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_HMAC" title="PSA_ALG_HMAC"><code class="docutils literal"><span class="pre">PSA_ALG_HMAC</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x03800000</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_AEAD" title="PSA_ALG_IS_AEAD"><code class="docutils literal"><span class="pre">PSA_ALG_IS_AEAD</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f000000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x05000000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER" title="PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER"><code class="docutils literal"><span class="pre">PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f400000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x05400000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_ASYMMETRIC_ENCRYPTION" title="PSA_ALG_IS_ASYMMETRIC_ENCRYPTION"><code class="docutils literal"><span class="pre">PSA_ALG_IS_ASYMMETRIC_ENCRYPTION</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f000000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x07000000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_IS_BLOCK_CIPHER_MAC" title="PSA_ALG_IS_BLOCK_CIPHER_MAC"><code class="docutils literal"><span class="pre">PSA_ALG_IS_BLOCK_CIPHER_MAC</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7fc00000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x03c00000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_CIPHER" title="PSA_ALG_IS_CIPHER"><code class="docutils literal"><span class="pre">PSA_ALG_IS_CIPHER</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f000000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x03000000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_DETERMINISTIC_ECDSA" title="PSA_ALG_IS_DETERMINISTIC_ECDSA"><code class="docutils literal"><span class="pre">PSA_ALG_IS_DETERMINISTIC_ECDSA</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x06000700</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_IS_ECDH" title="PSA_ALG_IS_ECDH"><code class="docutils literal"><span class="pre">PSA_ALG_IS_ECDH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7fff0000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x09020000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_ECDSA" title="PSA_ALG_IS_ECDSA"><code class="docutils literal"><span class="pre">PSA_ALG_IS_ECDSA</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x000001ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x06000600</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_IS_FFDH" title="PSA_ALG_IS_FFDH"><code class="docutils literal"><span class="pre">PSA_ALG_IS_FFDH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7fff0000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x09010000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_HASH" title="PSA_ALG_IS_HASH"><code class="docutils literal"><span class="pre">PSA_ALG_IS_HASH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f000000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x02000000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_HASH_AND_SIGN" title="PSA_ALG_IS_HASH_AND_SIGN"><code class="docutils literal"><span class="pre">PSA_ALG_IS_HASH_AND_SIGN</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(</span></code><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_RSA_PSS" title="PSA_ALG_IS_RSA_PSS"><code class="docutils literal"><span class="pre">PSA_ALG_IS_RSA_PSS</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">||</span> </code><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_RSA_PKCS1V15_SIGN" title="PSA_ALG_IS_RSA_PKCS1V15_SIGN"><code class="docutils literal"><span class="pre">PSA_ALG_IS_RSA_PKCS1V15_SIGN</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">||</span> </code><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_ECDSA" title="PSA_ALG_IS_ECDSA"><code class="docutils literal"><span class="pre">PSA_ALG_IS_ECDSA</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_IS_HKDF" title="PSA_ALG_IS_HKDF"><code class="docutils literal"><span class="pre">PSA_ALG_IS_HKDF</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x08000100</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_IS_HMAC" title="PSA_ALG_IS_HMAC"><code class="docutils literal"><span class="pre">PSA_ALG_IS_HMAC</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7fc0ff00</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x03800000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_KEY_AGREEMENT" title="PSA_ALG_IS_KEY_AGREEMENT"><code class="docutils literal"><span class="pre">PSA_ALG_IS_KEY_AGREEMENT</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f000000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x09000000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_KEY_DERIVATION" title="PSA_ALG_IS_KEY_DERIVATION"><code class="docutils literal"><span class="pre">PSA_ALG_IS_KEY_DERIVATION</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f000000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x08000000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_MAC" title="PSA_ALG_IS_MAC"><code class="docutils literal"><span class="pre">PSA_ALG_IS_MAC</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f000000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x03000000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_RANDOMIZED_ECDSA" title="PSA_ALG_IS_RANDOMIZED_ECDSA"><code class="docutils literal"><span class="pre">PSA_ALG_IS_RANDOMIZED_ECDSA</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x06000600</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_IS_RAW_KEY_AGREEMENT" title="PSA_ALG_IS_RAW_KEY_AGREEMENT"><code class="docutils literal"><span class="pre">PSA_ALG_IS_RAW_KEY_AGREEMENT</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f00ffff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x09000000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/pke.html#c.PSA_ALG_IS_RSA_OAEP" title="PSA_ALG_IS_RSA_OAEP"><code class="docutils literal"><span class="pre">PSA_ALG_IS_RSA_OAEP</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x07000300</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_RSA_PKCS1V15_SIGN" title="PSA_ALG_IS_RSA_PKCS1V15_SIGN"><code class="docutils literal"><span class="pre">PSA_ALG_IS_RSA_PKCS1V15_SIGN</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x06000200</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_RSA_PSS" title="PSA_ALG_IS_RSA_PSS"><code class="docutils literal"><span class="pre">PSA_ALG_IS_RSA_PSS</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x06000300</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_SIGN" title="PSA_ALG_IS_SIGN"><code class="docutils literal"><span class="pre">PSA_ALG_IS_SIGN</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f000000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x06000000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_SIGN_HASH" title="PSA_ALG_IS_SIGN_HASH"><code class="docutils literal"><span class="pre">PSA_ALG_IS_SIGN_HASH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_SIGN" title="PSA_ALG_IS_SIGN"><code class="docutils literal"><span class="pre">PSA_ALG_IS_SIGN</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_SIGN_MESSAGE" title="PSA_ALG_IS_SIGN_MESSAGE"><code class="docutils literal"><span class="pre">PSA_ALG_IS_SIGN_MESSAGE</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(</span></code><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_SIGN" title="PSA_ALG_IS_SIGN"><code class="docutils literal"><span class="pre">PSA_ALG_IS_SIGN</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;&amp;</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">!=</span> </code><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_ECDSA_ANY" title="PSA_ALG_ECDSA_ANY"><code class="docutils literal"><span class="pre">PSA_ALG_ECDSA_ANY</span></code></a><code class="docutils literal"> <span class="pre">&amp;&amp;</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">!=</span> </code><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_RSA_PKCS1V15_SIGN_RAW" title="PSA_ALG_RSA_PKCS1V15_SIGN_RAW"><code class="docutils literal"><span class="pre">PSA_ALG_RSA_PKCS1V15_SIGN_RAW</span></code></a><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_IS_STREAM_CIPHER" title="PSA_ALG_IS_STREAM_CIPHER"><code class="docutils literal"><span class="pre">PSA_ALG_IS_STREAM_CIPHER</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7f800000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x04800000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_IS_TLS12_PRF" title="PSA_ALG_IS_TLS12_PRF"><code class="docutils literal"><span class="pre">PSA_ALG_IS_TLS12_PRF</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x08000200</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_IS_TLS12_PSK_TO_MS" title="PSA_ALG_IS_TLS12_PSK_TO_MS"><code class="docutils literal"><span class="pre">PSA_ALG_IS_TLS12_PSK_TO_MS</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x08000300</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_IS_WILDCARD" title="PSA_ALG_IS_WILDCARD"><code class="docutils literal"><span class="pre">PSA_ALG_IS_WILDCARD</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(</span></code><a class="reference internal" href="../api/keys/algorithms.html#c.PSA_ALG_GET_HASH" title="PSA_ALG_GET_HASH"><code class="docutils literal"><span class="pre">PSA_ALG_GET_HASH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> </code><code class="docutils literal"><span class="pre">PSA_ALG_HASH_ANY</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_KEY_AGREEMENT" title="PSA_ALG_KEY_AGREEMENT"><code class="docutils literal"><span class="pre">PSA_ALG_KEY_AGREEMENT</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">ka_alg</span></code><code class="docutils literal"><span class="pre">,</span> </code><code class="docutils literal"><span class="pre">kdf_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><code class="docutils literal"><span class="pre">ka_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">|</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">kdf_alg</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_KEY_AGREEMENT_GET_BASE" title="PSA_ALG_KEY_AGREEMENT_GET_BASE"><code class="docutils literal"><span class="pre">PSA_ALG_KEY_AGREEMENT_GET_BASE</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">xffff0000</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_KEY_AGREEMENT_GET_KDF" title="PSA_ALG_KEY_AGREEMENT_GET_KDF"><code class="docutils literal"><span class="pre">PSA_ALG_KEY_AGREEMENT_GET_KDF</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">xfe00ffff</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/pke.html#c.PSA_ALG_RSA_OAEP" title="PSA_ALG_RSA_OAEP"><code class="docutils literal"><span class="pre">PSA_ALG_RSA_OAEP</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)(0</span></code><code class="docutils literal"><span class="pre">x07000300</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_RSA_PKCS1V15_SIGN" title="PSA_ALG_RSA_PKCS1V15_SIGN"><code class="docutils literal"><span class="pre">PSA_ALG_RSA_PKCS1V15_SIGN</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)(0</span></code><code class="docutils literal"><span class="pre">x06000200</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_RSA_PSS" title="PSA_ALG_RSA_PSS"><code class="docutils literal"><span class="pre">PSA_ALG_RSA_PSS</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)(0</span></code><code class="docutils literal"><span class="pre">x06000300</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_TLS12_PRF" title="PSA_ALG_TLS12_PRF"><code class="docutils literal"><span class="pre">PSA_ALG_TLS12_PRF</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x08000200</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_TLS12_PSK_TO_MS" title="PSA_ALG_TLS12_PSK_TO_MS"><code class="docutils literal"><span class="pre">PSA_ALG_TLS12_PSK_TO_MS</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x08000300</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x000000ff</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_TRUNCATED_MAC" title="PSA_ALG_TRUNCATED_MAC"><code class="docutils literal"><span class="pre">PSA_ALG_TRUNCATED_MAC</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">mac_alg</span></code><code class="docutils literal"><span class="pre">,</span> </code><code class="docutils literal"><span class="pre">mac_length</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="docutils literal"><span class="pre">psa_algorithm_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(((</span></code><code class="docutils literal"><span class="pre">mac_alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x003f0000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">|</span> <span class="pre">(((</span></code><code class="docutils literal"><span class="pre">mac_length</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x3f</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&lt;&lt;</span> <span class="pre">16)))</span></code></dd>
</dl>
</div>
<div class="section" id="key-type-macros">
<h2>Key type macros</h2>
<dl class="docutils">
<dt><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_BLOCK_CIPHER_BLOCK_LENGTH" title="PSA_BLOCK_CIPHER_BLOCK_LENGTH"><code class="docutils literal"><span class="pre">PSA_BLOCK_CIPHER_BLOCK_LENGTH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(1</span></code><code class="docutils literal"><span class="pre">u</span></code><code class="docutils literal"> <span class="pre">&lt;&lt;</span> <span class="pre">(((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&gt;&gt;</span> <span class="pre">8)</span> <span class="pre">&amp;</span> <span class="pre">7))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_DH_GET_FAMILY" title="PSA_KEY_TYPE_DH_GET_FAMILY"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_DH_GET_FAMILY</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/types.html#c.psa_dh_family_t" title="psa_dh_family_t"><code class="docutils literal"><span class="pre">psa_dh_family_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x00ff</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_DH_KEY_PAIR" title="PSA_KEY_TYPE_DH_KEY_PAIR"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_DH_KEY_PAIR</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">group</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_key_type_t" title="psa_key_type_t"><code class="docutils literal"><span class="pre">psa_key_type_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x7200</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">group</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_DH_PUBLIC_KEY" title="PSA_KEY_TYPE_DH_PUBLIC_KEY"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_DH_PUBLIC_KEY</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">group</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_key_type_t" title="psa_key_type_t"><code class="docutils literal"><span class="pre">psa_key_type_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x4200</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">group</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_ECC_GET_FAMILY" title="PSA_KEY_TYPE_ECC_GET_FAMILY"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_ECC_GET_FAMILY</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/types.html#c.psa_ecc_family_t" title="psa_ecc_family_t"><code class="docutils literal"><span class="pre">psa_ecc_family_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x00ff</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_ECC_KEY_PAIR" title="PSA_KEY_TYPE_ECC_KEY_PAIR"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_ECC_KEY_PAIR</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">curve</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_key_type_t" title="psa_key_type_t"><code class="docutils literal"><span class="pre">psa_key_type_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x7100</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">curve</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_ECC_PUBLIC_KEY" title="PSA_KEY_TYPE_ECC_PUBLIC_KEY"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_ECC_PUBLIC_KEY</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">curve</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_key_type_t" title="psa_key_type_t"><code class="docutils literal"><span class="pre">psa_key_type_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">(0</span></code><code class="docutils literal"><span class="pre">x4100</span></code><code class="docutils literal"> <span class="pre">|</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">curve</span></code><code class="docutils literal"><span class="pre">)))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_ASYMMETRIC" title="PSA_KEY_TYPE_IS_ASYMMETRIC"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_ASYMMETRIC</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x4000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x4000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_DH" title="PSA_KEY_TYPE_IS_DH"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_DH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR" title="PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">xff00</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x4200</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_DH_KEY_PAIR" title="PSA_KEY_TYPE_IS_DH_KEY_PAIR"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_DH_KEY_PAIR</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">xff00</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7200</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_DH_PUBLIC_KEY" title="PSA_KEY_TYPE_IS_DH_PUBLIC_KEY"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_DH_PUBLIC_KEY</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">xff00</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x4200</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_ECC" title="PSA_KEY_TYPE_IS_ECC"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_ECC</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR" title="PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">xff00</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x4100</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_ECC_KEY_PAIR" title="PSA_KEY_TYPE_IS_ECC_KEY_PAIR"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_ECC_KEY_PAIR</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">xff00</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7100</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY" title="PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">xff00</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x4100</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_KEY_PAIR" title="PSA_KEY_TYPE_IS_KEY_PAIR"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_KEY_PAIR</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_PUBLIC_KEY" title="PSA_KEY_TYPE_IS_PUBLIC_KEY"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_PUBLIC_KEY</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x4000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_RSA" title="PSA_KEY_TYPE_IS_RSA"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_RSA</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(</span></code><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR" title="PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x4001</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_UNSTRUCTURED" title="PSA_KEY_TYPE_IS_UNSTRUCTURED"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_IS_UNSTRUCTURED</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x1000</span></code><code class="docutils literal"> <span class="pre">||</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x7000</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">==</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x2000</span></code><code class="docutils literal"><span class="pre">)</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY" title="PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_key_type_t" title="psa_key_type_t"><code class="docutils literal"><span class="pre">psa_key_type_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">|</span> <span class="pre">0</span></code><code class="docutils literal"><span class="pre">x3000</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
<dt><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR" title="PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR"><code class="docutils literal"><span class="pre">PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><a class="reference internal" href="../api/keys/attributes.html#c.psa_key_type_t" title="psa_key_type_t"><code class="docutils literal"><span class="pre">psa_key_type_t</span></code></a><code class="docutils literal"><span class="pre">)</span> <span class="pre">((</span></code><code class="docutils literal"><span class="pre">type</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">&amp;</span> <span class="pre">~0</span></code><code class="docutils literal"><span class="pre">x3000</span></code><code class="docutils literal"><span class="pre">))</span></code></dd>
</dl>
</div>
<div class="section" id="hash-suspend-state-macros">
<h2>Hash suspend state macros</h2>
<dl class="docutils">
<dt><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_HASH_STATE_FIELD_LENGTH" title="PSA_HASH_SUSPEND_HASH_STATE_FIELD_LENGTH"><code class="docutils literal"><span class="pre">PSA_HASH_SUSPEND_HASH_STATE_FIELD_LENGTH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_MD2" title="PSA_ALG_MD2"><code class="docutils literal"><span class="pre">PSA_ALG_MD2</span></code></a><code class="docutils literal"> <span class="pre">?</span> <span class="pre">64</span> <span class="pre">:</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_MD4" title="PSA_ALG_MD4"><code class="docutils literal"><span class="pre">PSA_ALG_MD4</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_MD5" title="PSA_ALG_MD5"><code class="docutils literal"><span class="pre">PSA_ALG_MD5</span></code></a><code class="docutils literal"> <span class="pre">?</span> <span class="pre">16</span> <span class="pre">:</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_RIPEMD160" title="PSA_ALG_RIPEMD160"><code class="docutils literal"><span class="pre">PSA_ALG_RIPEMD160</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_1" title="PSA_ALG_SHA_1"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_1</span></code></a><code class="docutils literal"> <span class="pre">?</span> <span class="pre">20</span> <span class="pre">:</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_224" title="PSA_ALG_SHA_224"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_224</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_256" title="PSA_ALG_SHA_256"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_256</span></code></a><code class="docutils literal"> <span class="pre">?</span> <span class="pre">32</span> <span class="pre">:</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_512" title="PSA_ALG_SHA_512"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_512</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_384" title="PSA_ALG_SHA_384"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_384</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_512_256" title="PSA_ALG_SHA_512_256"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_512_256</span></code></a><code class="docutils literal"> <span class="pre">?</span> <span class="pre">64</span> <span class="pre">:</span> <span class="pre">0)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_INPUT_LENGTH_FIELD_LENGTH" title="PSA_HASH_SUSPEND_INPUT_LENGTH_FIELD_LENGTH"><code class="docutils literal"><span class="pre">PSA_HASH_SUSPEND_INPUT_LENGTH_FIELD_LENGTH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">((</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_MD2" title="PSA_ALG_MD2"><code class="docutils literal"><span class="pre">PSA_ALG_MD2</span></code></a><code class="docutils literal"> <span class="pre">?</span> <span class="pre">1</span> <span class="pre">:</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_MD4" title="PSA_ALG_MD4"><code class="docutils literal"><span class="pre">PSA_ALG_MD4</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_MD5" title="PSA_ALG_MD5"><code class="docutils literal"><span class="pre">PSA_ALG_MD5</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_RIPEMD160" title="PSA_ALG_RIPEMD160"><code class="docutils literal"><span class="pre">PSA_ALG_RIPEMD160</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_1" title="PSA_ALG_SHA_1"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_1</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_224" title="PSA_ALG_SHA_224"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_224</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_256" title="PSA_ALG_SHA_256"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_256</span></code></a><code class="docutils literal"> <span class="pre">?</span> <span class="pre">8</span> <span class="pre">:</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_512" title="PSA_ALG_SHA_512"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_512</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_384" title="PSA_ALG_SHA_384"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_384</span></code></a><code class="docutils literal"> <span class="pre">||</span> <span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)==</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_512_256" title="PSA_ALG_SHA_512_256"><code class="docutils literal"><span class="pre">PSA_ALG_SHA_512_256</span></code></a><code class="docutils literal"> <span class="pre">?</span> <span class="pre">16</span> <span class="pre">:</span> <span class="pre">0)</span></code></dd>
<dt><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_OUTPUT_SIZE" title="PSA_HASH_SUSPEND_OUTPUT_SIZE"><code class="docutils literal"><span class="pre">PSA_HASH_SUSPEND_OUTPUT_SIZE</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code></dt>
<dd><code class="docutils literal"><span class="pre">(</span></code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_ALGORITHM_FIELD_LENGTH" title="PSA_HASH_SUSPEND_ALGORITHM_FIELD_LENGTH"><code class="docutils literal"><span class="pre">PSA_HASH_SUSPEND_ALGORITHM_FIELD_LENGTH</span></code></a><code class="docutils literal"> <span class="pre">+</span> </code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_INPUT_LENGTH_FIELD_LENGTH" title="PSA_HASH_SUSPEND_INPUT_LENGTH_FIELD_LENGTH"><code class="docutils literal"><span class="pre">PSA_HASH_SUSPEND_INPUT_LENGTH_FIELD_LENGTH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">+</span> </code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_HASH_STATE_FIELD_LENGTH" title="PSA_HASH_SUSPEND_HASH_STATE_FIELD_LENGTH"><code class="docutils literal"><span class="pre">PSA_HASH_SUSPEND_HASH_STATE_FIELD_LENGTH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">+</span> </code><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_BLOCK_LENGTH" title="PSA_HASH_BLOCK_LENGTH"><code class="docutils literal"><span class="pre">PSA_HASH_BLOCK_LENGTH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span> <span class="pre">-</span> <span class="pre">1)</span></code></dd>
</dl>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Example macro implementations</a><ul>
<li><a class="reference internal" href="#algorithm-macros">Algorithm macros</a></li>
<li><a class="reference internal" href="#key-type-macros">Key type macros</a></li>
<li><a class="reference internal" href="#hash-suspend-state-macros">Hash suspend state macros</a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../index.html">Documentation overview</a><ul>
      <li>Previous: <a href="example_header.html" title="previous chapter">Example header file</a></li>
      <li>Next: <a href="history.html" title="next chapter">Changes to the API</a></li>
  </ul></li>
</ul>
</div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/appendix/specdef_values.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy; 2019-2020, Arm Limited or its affiliates. All rights reserved.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.7</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
      
      |
      <a href="../_sources/appendix/specdef_values.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>